Release 10.1A: OpenEdge Development:
Java Open Clients
Using com.progress.open4gl.InputResultSet
The
com.progress.open4gl.InputResultSetabstract class implements thejava.sql.ResultSetinterface except for two methods that you must implement in your extended class. The proxy calls back through these methods to get the data to pass to Progress.The two methods you must implement are:
This advances the
Caution: Make sure theResultSetcursor to the next row. The cursor always is initially positioned before the first row of theResultSet; as a result, the first timenext()is called the cursor moves to the first row. It returns false when there are no more rows.ResultSetcursor is positioned before the first row if you plan to pass theInputResultSetas an input parameter, and you want the receiving context to have access to all rows from the beginning of theInputResultSet. Only rows after the current cursor position are passed to the AppServer.
columnNumObtains the value of an individual column as an object. The
columnNumparameter is a 1-based index indicating which column value to get. This must correctly map to the order in which the temp-table fields are defined in the 4GL procedure.If there is an array field in the temp-table, it is treated as a flattened set of columns by this method. On input, since the proxy is calling back to the client, there can be only one way to get the data, and that one way assumes the flat column model native to the standard JDBC
ResultSet.Your implementation of these methods can differ depending on the data source for the input temp-table. For example, the data might come from an in-memory vector or be read from a file. The exact implementation, therefore, depends on the specific requirements of your application.
You can use the following methods with the
InputResultSetclass to omit all schema information when marshaling data from the Java Open Client to the AppServer. Using these methods suppresses index descriptions and all field information and aids in faster transmission of data, thereby increasing the performance of your application. You can use these methods when the receiving side knows the schema definition for the table and validation is not necessary.The following method tells the proxy to marshal the specified
InputResultSetfrom the Java client to the AppServer without schema information, whenflagis set totrue:
The corresponding Progress temp-table on the AppServer must have the same schema as the
ResultSeton the client.The Java Open Client generates a
RunTime4GLErrorExceptionwhen:The following method on the
InputResultSetreturnstrueif the proxy will not marshal schema information to the AppServer; it returnsfalseif it will marshall information:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |